/* RGBStrip.h - Library for use with RGB LED strip utilizing the HL1606 controller chip
This library written by Ben Moyes, Bliptronics.com June 2010
ben@bliptronics.com
Released into the public domain.
Please give credit to this work, where due.
*/


#ifndef RGBStrip_h
#define RGBStrip_h

#include "WProgram.h"

class RGBStrip
{
  public:
    RGBStrip(unsigned int S, unsigned int D, unsigned int C, unsigned int L, unsigned int LEDCount, unsigned char * displayAddr );
    void sPulse();
    void sendByte(unsigned char it);
    void SetLed(unsigned int Led, unsigned int Color);
    void latch();
    void runfader(unsigned int y, unsigned int d);

    void displaySend();
    void displaySetSection(unsigned int startled, unsigned int endled, unsigned char ledvalue);
         
  private:
    int _S, _D, _C, _L;
    unsigned int _LEDCount, _ClockWait;
    unsigned char * Display;
    
};
#endif
